/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ASAExpr;

import exception.VariableNonDeclareeException;

/**
 *
 * @author FM & KB
 */
public abstract class ASAExprAffectation extends ASAExpr {

    protected ASAExprRecupIdent variable;
    protected ASAExpr valeur;
    
    public ASAExprAffectation(ASAExprRecupIdent e1, ASAExpr e2){
        variable = e1;
        valeur = e2;
    }      
    
    public ASAExprIdent getExpr1(){
        ASAExprIdent var = null;
        try {
            var = variable.recupVariable();
        } catch (VariableNonDeclareeException vnde) {
            System.out.println(vnde.getMessage());
        }
        return var;
    }
    public ASAExpr getExpr2(){
        return valeur;
    }
}
